import java.util.*;
import java.io.*;

class Read {
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
}
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code2 {

    public static void main(String[] args) throws IOException {
        Read in = new Read();
        int n = in.nextInt(),x=in.nextInt();
        int[] arr = new int[n+1];//注意下标从一开始
        for(int i=1;i<n+1;i++) {
            arr[i] = in.nextInt();
        }
        int left=1,right=1;
        int retLeft=0,retRight=0;
        int sum = 0;
        int retLen = n;
        while(right<=n) {
            //进窗口
            sum+=arr[right];
            //判断
            while(sum>=x) {//这个等于号：刚刚好为ret也得更新结果
                //更新结果
                if(right-left+1<retLen) {
                    retLen = right-left+1;
                    retLeft = left;
                    retRight = right;
                }
                //出窗口
                sum -= arr[left++];
            }
            right++;//这步得在最后加
        }
        System.out.print(retLeft+" "+retRight);
    }
}
